// redis
package lib

import (
	"time"

	"github.com/garyburd/redigo/redis"
)

type RedisPool struct {
	Pool *redis.Pool
}

func (r *RedisPool) CreatePool(addr string) {
	r.Pool = &redis.Pool{
		MaxIdle:     3,
		IdleTimeout: 240 * time.Second,
		Dial:        func() (redis.Conn, error) { return redis.Dial("tcp", addr) },
	}
}
